package bmatch.tech.cloud.service;

import bmatch.tech.cloud.model.Response;

import java.io.InputStream;

/**
 * FileService的注释
 *
 * @author: Awake
 * @date: 2018-12-14 14:20
 **/
public interface FileService {

    /**
     * 上传文件
     *
     * @param userId
     * @param inputStream
     * @param path
     * @param name
     * @return
     */
    Response upload(String userId, InputStream inputStream, String path, String name);

    /**
     * 下载文件
     *
     * @param userId
     * @param path
     * @param name
     * @return
     */
    javax.ws.rs.core.Response download(String userId, String path, String name);

    /**
     * 删除文件
     *
     * @param userId
     * @param path
     * @param name
     * @return
     */
    Response delete(String userId, String path, String name);

    /**
     * 重命名文件
     *
     * @param userId
     * @param path
     * @param originalName
     * @param targetName
     * @return
     */
    Response rename(String userId, String path, String originalName, String targetName);

    /**
     * 转移路径
     *
     * @param userId
     * @param name
     * @param originalPath
     * @param targetPath
     * @return
     */
    Response shift(String userId, String name, String originalPath, String targetPath);


}
